package com.advertisementsystem.Servie;

import com.advertisementsystem.Dto.ScheduleDTO;
import com.advertisementsystem.Dto.ScheduleUpdateDTO;
import com.advertisementsystem.entity.Schedule;
import com.advertisementsystem.vo.AdSchedule;
import com.advertisementsystem.vo.ScheduleVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.time.LocalDate;
import java.util.List;

public interface ScheduleService {



    Schedule createSchedule(ScheduleDTO dto);
    List<Schedule> getDeviceSchedule(Long deviceId, LocalDate startDate, LocalDate endDate);
    List<ScheduleVo> getAdvertisementSchedule(Long adId);
    Schedule updateSchedule(Long id, ScheduleUpdateDTO dto);

    boolean checkNegotiationHasSchedule(Long negotiationId);

    Page<Schedule> page(Page<Schedule> page, LambdaQueryWrapper<Schedule> queryWrapper);

    Page<ScheduleVo> getAdvertiserSchedules(Long advertiserId, Integer pageNum, Integer pageSize, String adTitle, String deviceName, String status);

    ScheduleVo getScheduleDetailForAdvertiser(Long id, Long advertiserId);

    boolean cancelScheduleForAdvertiser(Long id, Long advertiserId);

    IPage<AdSchedule> getScheduleList(Page<Schedule> page, Long userId, String status, Long deviceId, String startDate, String endDate);

    boolean updateStatus(Long id, String status, Long userId);
}
